﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<DCHealthCheck.MvcWeb.Classes.ViewModels.ProcessInfoViewModel>" %>
<%@ Import Namespace="DCHealthCheck.MvcWeb.Classes" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    <%:Global.ApplicationName%>::<%:Model.ControllerName%>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="infobox">
        <%Html.RenderPartial("DateFilterControl"); %>
        <%Html.RenderPartial("DomainFilterControl"); %>
        <%Html.RenderPartial("ProcessExecutableFilterControl"); %>
        <%Html.RenderPartial("DCNameFilterControl"); %>
    </div>
    <div id="contents">
        <div id="leftcontainer">
            <%Html.RenderPartial("TableHeader", this.Model); %>
            <%Html.RenderPartial("ProcessInfoTable", this.Model); %>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptsSection" runat="server">
    <script type="text/javascript">
        $(document).ready(function () {

            $("#searchForm").append('<input type="hidden" name="processExecutable" value="<%:Model.ProcessExecutable%>" id="hiddenProcessExecutable" />');

            $("#processExecutableDDL").on("change", function () {
                $("#hiddenProcessExecutable").val($(this).find(":selected").text());
                spinblock();
                searchForm.submit();
            });

            // assign a tooltip value for each dropdown option using the select option value.  Used for the option title, not posted value.
            $("#processExecutableDDL option").each(function () { this.setAttribute("title", this.value) });
        });
    </script>
</asp:Content>
